home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / GCC / CLIB / !clib / h / limits < prev    next >
Text File  |  1997-03-23  |  2KB  |  61 lines

  1. /* limits.h
  2.  
  3.    For use with the GNU compilers and the SharedCLibrary.
  4.    (c) Copyright 1997, Nick Burrett.  */
  5.  
  6. #ifndef __LIMITS_H
  7. #define __LIMITS_H
  8.  
  9. /* Number of bits in a 'char'.  */
  10. #define CHAR_BIT    8
  11. /* Minimum value that can be represented by a 'signed char'.  */
  12. #define SCHAR_MIN    (-0x80)
  13. /* Maximum values that can be represented by a 'signed char'
  14.    and 'unsigned char', respectively.  */
  15. #define SCHAR_MAX    0x7f
  16. #define UCHAR_MAX    0xff
  17. /* Minimum and maximum values that can be represented by a 'char'.  */
  18. #define CHAR_MIN    0x00
  19. #define CHAR_MAX    0xff
  20.  
  21. /* Maximum length of a multibyte character.  */
  22. #define MB_LEN_MAX    1
  23.  
  24. /* Minimum value that can be represented by a 'signed short int'.  */
  25. #define SHRT_MIN    (short)(0x8000U)
  26. /* Maximum values that can be represented by a 'signed short int'
  27.    and 'unsigned short int', respectively.  */
  28. #define SHRT_MAX    0x7fff
  29. #define USHRT_MAX    0xffffU
  30.  
  31. /* Minimum value that can be represented by a 'signed int'.  */
  32. #define INT_MIN     (int)(0x80000000U)
  33. /* Maximum values that can be represented by a 'signed int'
  34.    and 'unsigned int'.  */
  35. #define INT_MAX     0x7fffffff
  36. #define UINT_MAX    0xffffffffU
  37.  
  38. /* The number of bits in a 'long int'.  */
  39. #define LONGBITS 32
  40. /* Minimum value that can be represented by a 'signed long int'.  */
  41. #define LONG_MIN    (long)(0x80000000UL)
  42. /* Maximum values that can be represented by a 'signed long int'
  43.    and 'unsigned long int'.  */
  44. #define LONG_MAX    0x7fffffffL
  45. #define ULONG_MAX    0xffffffffUL
  46.  
  47. #ifdef __GNUC__
  48. /* For GNU C 'long long' compatibility only.  */
  49.  
  50. /* The minimum value that can be represented by a
  51.    'signed long long int'.  */
  52. #define LONG_LONG_MIN    0x8000000000000000LL
  53. /* The maximum values that can be represented by a
  54.    'signed long long int' and 'unsigned long long int'.  */
  55. #define LONG_LONG_MAX    0x7fffffffffffffffLL
  56. #define ULONG_LONG_MAX    0xffffffffffffffffULL
  57.  
  58. #endif
  59.  
  60. #endif
  61.